// cover some element-ui styles
// 重置button默认字体大小，并给默认size增加medium尺寸，如果直接增加会有size的枚举提示
.el-button {
  &--default {
    padding: 6px 10px;
    font-size: calc(var(--el-font-size-base) - 1px);
    &.medium {
      height: 36px;
      padding: 8px 14px;
      font-size: var(--el-font-size-base);
    }
  }
  &--small {
    padding: 4px 6px;
    font-size: calc(var(--el-font-size-base) - 3px);
  }
  &--large {
    padding: 10px 18px;
    font-size: calc(var(--el-font-size-base) + 2px);
  }
}

.el-dialog__body {
  padding: 10px 20px;
}
.el-form--inline .el-form-item {
  margin-right: 20px;
  &:last-child {
    margin-right: 0;
  }
  .el-form-item__label {
    padding-right: 10px;
  }
}

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type='file'] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0px;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
  .el-button + .el-button {
    margin-left: 4px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow {
  display: none;
}

.el-dropdown .el-dropdown-link {
  color: var(--el-color-primary) !important;
}

.el-notification__content {
  margin: 0;
}

.el-date-editor.el-input,
.el-input-number {
  max-width: 100%;
}

// 上传相关
.el-upload-list {
  line-height: 1;
}
.el-upload__tip {
  line-height: 1.2;
}
.el-upload.el-upload--picture-card {
  line-height: 120px;
}
.el-upload.el-upload--picture-card,
.el-upload-list--picture-card .el-upload-list__item {
  width: 120px;
  height: 120px;
}

// input计数器
.el-input-number.text-left .el-input__inner {
  text-align: left;
}
.el-input-number.text-right .el-input__inner {
  text-align: right;
}

/** 定义一些自适应弹窗宽度 **/
// 因为表单的弹窗使用的v-if,加入动画防止源动画效果比较突兀，
@keyframes showDialog {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.diaolog-b5,
.dialog-xs,
.dialog-sm,
.dialog-md,
.dialog-lg,
.dialog-xl {
  opacity: 1;
  animation: showDialog 0.1s ease-in;
}
.dialog-xs.el-dialog,
.dialog-xs.el-drawer {
  width: 400px;
}
.dialog-sm.el-dialog,
.dialog-sm.el-drawer {
  width: 540px;
}
.dialog-md.el-dialog,
.dialog-md.el-drawer {
  width: 680px;
}
.dialog-lg.el-dialog,
.dialog-lg.el-drawer {
  width: 820px;
}
.dialog-xl.el-dialog,
.dialog-xl.el-drawer {
  width: 950px;
}
@media (max-width: 760px) {
  .dialog-xs .el-dialog, 
  .dialog-xs .el-drawer {
    width: 60%;
  }
  .dialog-sm .el-dialog, 
  .dialog-sm .el-drawer {
    width: 70%;
  }
  .dialog-md .el-dialog, 
  .dialog-md .el-drawer {
    width: 80%;
  }
}
@media (max-width: 970px) {
  .dialog-lg.el-dialog,
  .dialog-lg.el-drawer {
    width: 90%;
  }
  .dialog-xl.el-dialog,
  .dialog-xl.el-drawer {
    width: 95%;
  }
  .pagination-container .el-pagination > .el-pagination__jump {
    display: none !important;
  }
  .pagination-container .el-pagination > .el-pagination__sizes {
    display: none !important;
  }
}

.dialog-xs,
.dialog-sm,
.dialog-md,
.dialog-lg,
.dialog-xl {
  .el-drawer__header {
    padding-bottom: 20px;
    margin-bottom: 0;
  }
  .el-drawer__body {
    padding: 10px 20px 20px 20px;
  }
}

.dialog-footer {
  text-align: center;
  &.slot {
    padding: 10px 0 0 0;
  }
  .el-button + .el-button {
    margin-left: 30px;
  }
}

